var https = require('https');


/* 将用户代理指定为一个新建的https.Agent对象 */
var options = {
	hostname: 'encrypted.google.com',
	port: 443,
	path: '/',
	methos: 'GET',
	key: fs.readFileSync('./agent2-key.pem'),
 	cert: fs.readFileSync('./agent2-cert.pem')
}

options.agent = new https.Agent(options);

var req = https.request(options, function(res){

});



/* 自动从连接池中挑选一个当前连接状态为关闭的用户代理 */
var options = {
	hostname: 'encrypted.google.com',
	port: 443,
	path: '/',
	methos: 'GET',
	key: fs.readFileSync('./agent2-key.pem'),
 	cert: fs.readFileSync('./agent2-cert.pem'),
 	agent: false
}

var req = https.request(options, function(res){

});